﻿using UnityEngine;

namespace Room
{
    class ServerMonsterAIStateDeath : ServerMonsterAIStateBase
    {
        GameObject obj;
        protected override void OnEnter()
        {
            obj = GameObjectPoolManager.Instance.Spawn(RoomField.particleDieAb,CommonMethod.GetAssetNameFromAssetBundleName(RoomField.particleDieAb));
            obj.transform.SetParent(controller.owner.transform);
            obj.transform.localScale = Vector3.one;
            obj.transform.localPosition = Vector3.zero;
            obj.transform.SetParent(controller.owner.transform.parent);
            obj.SetActive(true);

            GameObjectPoolManager.Instance.Unspawn(obj, 1f);
        }
    }
}
